Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

chess_play.js ➔ bindOne   A
last analyzed

Complexity

Conditions 2

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 2
eloc 3
c 0
b 0
f 0
dl 0
loc 5
rs 10
1
"use strict";
2
3
(function() {
4
5
	/** global availableMoves, submitMoveHREF */
6
7
	function submitMove(data) {
8
		var e = $(this);
9
		data.toX = e.data('x');
10
		data.toY = e.data('y');
11
		ajaxLink(submitMoveHREF, {callback: highlightMoves, params: data});
0 ignored issues
show
Bug introduced by
The variable submitMoveHREF seems to be never declared. If this is a global, consider adding a /** global: submitMoveHREF */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
Bug introduced by
The variable highlightMoves seems to be never declared. If this is a global, consider adding a /** global: highlightMoves */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
12
	}
13
14
	function bindOne(func, arg) {
15
		return function() {
16
			return func.call(this, arg);
17
		};
18
	}
19
20
	window.highlightMoves = function() {
21
		var highlighted = $('.chessHighlight');
22
		if (highlighted.length === 0) {
23
			var e = $(this);
24
			var x = e.data('x');
25
			var y = e.data('y');
26
			var boundSubmitMove = bindOne(submitMove, {x:x,y:y});
27
			$(availableMoves[y][x]).addClass('chessHighlight').each(function(i, e) {
0 ignored issues
show
Bug introduced by
The variable availableMoves seems to be never declared. If this is a global, consider adding a /** global: availableMoves */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
28
				e.onclick = boundSubmitMove;
29
			});
30
		} else {
31
			highlighted.removeClass('chessHighlight').each(function(i, e){
32
				e.onclick = highlightMoves;
0 ignored issues
show
Bug introduced by
The variable highlightMoves seems to be never declared. If this is a global, consider adding a /** global: highlightMoves */ comment.

This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.

To learn more about declaring variables in Javascript, see the MDN.

Loading history...
33
			});
34
		}
35
	};
36
37
})();
38